package com.waverider.promotion.enums;

/**
 * 
 * @author sihai
 *
 */
public enum PromotionStatusEnum
{
	PROMOTION_STATUS_NOT_START(0, "未开始"),
	PROMOTION_STATUS_STARTED(1, "进行中"),
	PROMOTION_STATUS_END(2, "已经结束");
	
	private int value;
	private String desc;
	
	private PromotionStatusEnum(int value, String desc)
	{
		this.value = value;
		this.desc = desc;
	}
	
	public static PromotionStatusEnum toEnum(int value)
	{
		for(PromotionStatusEnum e : PromotionStatusEnum.values())
		{
			if(e.value == value)
			{
				return e;
			}
		}
		
		return null;
	}
	
	public int value()
	{
		return value;
	}
	
	public String desc()
	{
		return desc;
	}
}
